<template>
	<div v-title data-title="文化">
		<NavTop></NavTop>
		<el-main style="margin-top: 60px;">
			
			<el-row>
			  <el-col :span="24">
			    <div class="grid-content bg-purple-dark">
			      <div class="news-head">
			        <img class="news-post" src="@/assets/logo.png" width="40px" height="40px" />
			        <span class="news-author">与时网</span>
			        <span class="news-time"><i class="el-icon-date"></i> 发布时间: 2021-11-18</span>
			        <el-divider></el-divider>
			      </div>
			    </div>
			  </el-col>
			</el-row>
			
			<el-row :gutter="20">
			  <el-col :span="16">
			    <div class="grid-content bg-purple">
			      <el-card class="carousel">
			        <el-carousel :interval="4000" type="card" height="330px">
			          <el-carousel-item>
			            <img class="medium" src="@/assets/images/c1.jpg">
			          </el-carousel-item>
			          <el-carousel-item>
			            <img class="medium" src="@/assets/images/c2.jpg">
			          </el-carousel-item>
			          <el-carousel-item>
			            <img class="medium" src="@/assets/images/c3.jpg">
			          </el-carousel-item>
			
			        </el-carousel>
			      </el-card>
			    </div>
			  </el-col>
			  <el-col :span="8">
			    <el-card>
			      <div class="news" v-for="news in newsData.slice(50,57)">
			      	<router-link style="color: black;" :to="{name: 'NewsDetail', params:{newsId: news.id}}">
			      		<h2>{{news.title}}</h2>
			      		<br>
			      	</router-link>
			      </div>
			    </el-card>
			  </el-col>
			</el-row>
			
			<el-row :gutter="20">
			  <el-col :span="8">
			    <div class="grid-content bg-purple">
			      <el-card v-for="news in newsData.slice(57,64)">
					  <router-link style="color: black;" :to="{name: 'NewsDetail', params:{newsId: news.id}}">
					  	<h3>{{news.title}}</h3>
					  </router-link>
				  </el-card> 
			    </div>
			  </el-col>
			  <el-col :span="8">
			    <div class="grid-content bg-purple">
					<el-card v-for="news in newsData.slice(19,26)">
					  <router-link style="color: black;" :to="{name: 'NewsDetail', params:{newsId: news.id}}">
						<h3>{{news.title}}</h3>
					  </router-link>
					</el-card> 
			    </div>
			  </el-col>
			  <el-col :span="8">
			    <div class="grid-content bg-purple">
			      <el-card>
			        <div class="news" v-for="news in newsData.slice(33,40)">
			        	<router-link style="color: black;" :to="{name: 'NewsDetail', params:{newsId: news.id}}">
			        		<h2>{{news.title}}</h2>
			        		<br>
			        	</router-link>
			        </div>
			      </el-card>
			    </div>
			  </el-col>
			</el-row>
			
			<el-row>
				<el-col :span="24">
					<div class="grid-content bg-purple-dark">
						<h1 class="h1-height">文化要闻</h1>
					</div>
				</el-col>
			</el-row>
			<el-row :gutter="20">
				<el-col :span="6">
					<div class="grid-content bg-purple">
						<el-card>
							<div class="news" v-for="news in newsData.slice(0,7)">
								<router-link style="color: black;" :to="{name: 'NewsDetail', params:{newsId: news.id}}">
									<h4>{{news.title}}</h4>
									<br>
								</router-link>
							</div>		
						</el-card>
					</div>
				</el-col>
				<el-col :span="6">
					<div class="grid-content bg-purple">
						<el-card>
							<div class="news" v-for="news in newsData.slice(11,18)">
								<router-link style="color: black;" :to="{name: 'NewsDetail', params:{newsId: news.id}}">
									<h4>{{news.title}}</h4>
									<br>
								</router-link>
							</div>		
						</el-card>
					</div>
				</el-col>
				<el-col :span="6">
					<div class="grid-content bg-purple">
						<el-card>
							<div class="news" v-for="news in newsData.slice(21,28)">
								<router-link style="color: black;" :to="{name: 'NewsDetail', params:{newsId: news.id}}">
									<h4>{{news.title}}</h4>
									<br>
								</router-link>
							</div>			
						</el-card>
					</div>
				</el-col>
				<el-col :span="6">
					<div class="grid-content bg-purple">
						<el-card>
							<div class="news" v-for="news in newsData.slice(31,38)">
								<router-link style="color: black;" :to="{name: 'NewsDetail', params:{newsId: news.id}}">
									<h4>{{news.title}}</h4>
									<br>
								</router-link>
							</div>		
						</el-card>
					</div>
				</el-col>
			</el-row>
			
			<el-row>
				<el-col :span="24">
					<div class="grid-content bg-purple-dark">
						<h1 class="h1-height">热点要闻</h1>
					</div>
				</el-col>
			</el-row>
			<el-row :gutter="20">
				<el-col :span="6">
					<div class="grid-content bg-purple">
						<el-card>
							<div class="news" v-for="news in newsData.slice(41,48)">
								<router-link style="color: black;" :to="{name: 'NewsDetail', params:{newsId: news.id}}">
									<h4>{{news.title}}</h4>
									<br>
								</router-link>
							</div>		
						</el-card>
					</div>
				</el-col>
				<el-col :span="6">
					<div class="grid-content bg-purple">
						<el-card>
							<div class="news" v-for="news in newsData.slice(51,58)">
								<router-link style="color: black;" :to="{name: 'NewsDetail', params:{newsId: news.id}}">
									<h4>{{news.title}}</h4>
									<br>
								</router-link>
							</div>	
						</el-card>
					</div>
				</el-col>
				<el-col :span="6">
					<div class="grid-content bg-purple">
						<el-card>
							<div class="news" v-for="news in newsData.slice(61,68)">
								<router-link style="color: black;" :to="{name: 'NewsDetail', params:{newsId: news.id}}">
									<h4>{{news.title}}</h4>
									<br>
								</router-link>
							</div>		
						</el-card>
					</div>
				</el-col>
				
				<el-col :span="6">
					<div class="grid-content bg-purple">
						<el-card>
							<div class="news" v-for="news in newsData.slice(71,78)">
								<router-link style="color: black;" :to="{name: 'NewsDetail', params:{newsId: news.id}}">
									<h4>{{news.title}}</h4>
									<br>
								</router-link>
							</div>		
						</el-card>
					</div>
				</el-col>
			</el-row>
		</el-main>
		<Footer></Footer>
	</div>
</template>

<script>
	import NavTop from "@/components/NavTop"
	import Footer from "@/components/Footer"
	export default{
		name: 'Culture',
		components: {
			NavTop,
			Footer
		},
		data() {
			return {
				
				//新闻内容
				newsData:{
					
				},
		
			}
		
		},
		methods: {
			getNews(){
				this.$axios.get('/newsList').then(res => {
					this.newsData = res.data.data
				})
				
			},
		},
		created() {
			this.getNews()
		}
	}
</script>

<style>

</style>
